﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2023 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core.EventBus;

/// <summary>
/// 处理中的事件
/// </summary>
public class ProcessingEventSourceStorerDto
{
    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="eventSourceStorer"></param>
    public ProcessingEventSourceStorerDto(SysEventSourceStorer eventSourceStorer)
    {
        this.EventSourceStorer = eventSourceStorer;
    }

    /// <summary>
    /// 事件源存储器
    /// </summary>
    public SysEventSourceStorer EventSourceStorer { get; set; }

    /// <summary>
    /// 过期时间，过期后悔从处理的集合中移除
    /// </summary>
    public DateTimeOffset? ExpirationTime { get; set; }

    /// <summary>
    /// 最大可处理时间(用来判断长时间未处理的数据，防止死数据产生)
    /// </summary>
    public DateTimeOffset MaxProcessingTime = DateTimeOffset.Now.AddMinutes(1);
}